package com.wcgksoft.entity.dataAnalysis;

import com.wcgksoft.entity.Equipment.DataType;
import com.wcgksoft.entity.Equipment.Equipment;
import com.wcgksoft.entity.system.EnterpriseProject;
import org.hibernate.annotations.Cascade;

import javax.persistence.*;
import java.util.Date;

/**
 * @author 蒋世维
 * <p>
 * 项目名称：wisdom
 * 类名称：DepartProjectData
 * 类描述：数据点
 * 创建人：jiangshiwei
 * 创建时间：2019-03-24 AM13:18:05
 * 修改备注：
 * @version 1.0.0
 */
@Entity
@Table(name = "t_depart_project_data")
public class DepartProjectData {

  @Id
  @Basic(optional = false)
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", nullable = false)
  private Integer id;

  /**
   * 企业的项目信息
   */

  @OneToOne(fetch = FetchType.EAGER, optional = true)
  @JoinColumn(name = "depart_project_id", nullable = true)
  @Cascade({org.hibernate.annotations.CascadeType.REFRESH})
  private EnterpriseProject enterpriseProject;


  /**
   * 设备
   */
  @OneToOne(fetch = FetchType.EAGER, optional = true)
  @JoinColumn(name = "equipment_id", nullable = true)
  @Cascade({org.hibernate.annotations.CascadeType.REFRESH})
  private Equipment equipment;

  /**
   * 数据类型 传感器类型
   */
  @OneToOne(fetch = FetchType.EAGER)
  @JoinColumn(name = "dataType_id")
  @Cascade({org.hibernate.annotations.CascadeType.REFRESH})
  private DataType dataType;

  /**
   * 数据点名称
   */
  @Column(name = "data_name", length = 100)
  private String dataName;


  /**
   * id是打开
   */
  @Column(name = "bbbbid", length = 100)
  private Integer bbbbid;


  /**
   * 通道号
   */
  @Column(name = "com", length = 100)
  private String com;

  /**
   * 创建时间
   */
  @Column(name = "create_date")
  private Date createDate;

  /**
   * 项目名称
   */
  @Column(name = "proname")
  private String name;

  @Transient
  private Threshold threshold;


  @Transient
  private Integer code;
  /*
   * 舒适区上限
   * */
  @Column(name = "upperlimit")
  private Double upperlimit;
  /*
   * 舒适区下限
   * */
  @Column(name = "lowerlimit")
  private Double lowerlimit;

  /*
   * 舒适区上限颜色
   * */
  @Column(name = "upperlimitcolor")
  private String upperlimitcolor;
  /*
   * 舒适区下限颜色
   * */
  @Column(name = "lowerlimitcolor")
  private String lowerlimitcolor;
  /*
   * 告警手机号1
   * */
  @Column(name = "phone01")
  private String phone01;
  /*
   * 告警手机号2
   * */
  @Column(name = "phone02")
  private String phone02;

  public Threshold getThreshold() {
    return threshold;
  }

  public void setThreshold(Threshold threshold) {
    this.threshold = threshold;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public EnterpriseProject getEnterpriseProject() {
    return enterpriseProject;
  }

  public void setEnterpriseProject(EnterpriseProject enterpriseProject) {
    this.enterpriseProject = enterpriseProject;
  }

  public Equipment getEquipment() {
    return equipment;
  }

  public void setEquipment(Equipment equipment) {
    this.equipment = equipment;
  }

  public DataType getDataType() {
    return dataType;
  }

  public void setDataType(DataType dataType) {
    this.dataType = dataType;
  }

  public String getDataName() {
    return dataName;
  }

  public void setDataName(String dataName) {
    this.dataName = dataName;
  }

  public String getCom() {
    return com;
  }

  public void setCom(String com) {
    this.com = com;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getBbbbid() {
    return bbbbid;
  }

  public void setBbbbid(Integer bbbbid) {
    this.bbbbid = bbbbid;
  }

  public Double getUpperlimit() {
    return upperlimit;
  }

  public void setUpperlimit(Double upperlimit) {
    this.upperlimit = upperlimit;
  }

  public Double getLowerlimit() {
    return lowerlimit;
  }

  public void setLowerlimit(Double lowerlimit) {
    this.lowerlimit = lowerlimit;
  }

  public String getUpperlimitcolor() {
    return upperlimitcolor;
  }

  public void setUpperlimitcolor(String upperlimitcolor) {
    this.upperlimitcolor = upperlimitcolor;
  }

  public String getLowerlimitcolor() {
    return lowerlimitcolor;
  }

  public void setLowerlimitcolor(String lowerlimitcolor) {
    this.lowerlimitcolor = lowerlimitcolor;
  }

  public String getPhone01() {
    return phone01;
  }

  public void setPhone01(String phone01) {
    this.phone01 = phone01;
  }

  public String getPhone02() {
    return phone02;
  }

  public void setPhone02(String phone02) {
    this.phone02 = phone02;
  }

  public Integer getCode() {
    return code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }
}
